package com.org.Bibliotech;

/**
 * Created by Joshua on 6/8/2014.
 */
public class Customer {

    private String name, loginNumber, password, email, phoneNumber;

    public Customer(String name, String loginNumber, String password, String email, String phoneNumber){
        this.name = name;
        this.loginNumber = loginNumber;
        this.password = password;
        this.email = email;
        this.phoneNumber = phoneNumber;
    }

    public String getName(){
        return name;
    }

    public String getLoginNumber(){
        return loginNumber;
    }

    public String getPassword(){
        return password;
    }

    public String email(){
        return email;
    }

    public String getPhoneNumber(){
        return phoneNumber;
    }

    public boolean equals(Customer customer){
        return loginNumber.equals(customer.getLoginNumber()) && password.equals(customer.getPassword());
    }

    public boolean isMatch(String login, String pass){
         return login.equals(loginNumber ) && pass.equals(password);

    }

    public String getDetails(){

        return "Name: " + name +'\n' +
                "Login Number: " + loginNumber + '\n' +
                     "Password: " + password + '\n' +
                        "Email: " + email + '\n' +
                            "Phone Number: " + phoneNumber;

    }
}
